put fileExists(it,"nodialog:errGlobal") into itIsThere
if last char of it = ":" then put "folder" into type
else put "file" into type
if itIsThere = "true" then
answer "Good guess! That" && type && "exists!"
else
answer "Sorry, that" && type && "does not exist!"
end if
end mouseUp
-- part contents for background part 38
----- text -----
16/50
-- part contents for background part 20
----- text -----
FileExists - An XFCN to test whether or not a file/folder exists on a mounted volume.
FileExists(pathname, «"noDialog:"errorGlobal»)
This XFCN returns TRUE or FALSE depending on whether or not the file/folder specified by Pathname is on a mounted volume. It is useful to check for things like preferences stacks which your stack needs to install.
-- part contents for background part 42
----- text -----
{ FileExits(pathname «,"nodialog":errGlobal») }
{}
{ XFCN to determin whether or not the specified file/folder }
{ exists. Makes no modifications to the file/folder. }
{ Returns TRUE if the file/folder exists and FALSE if it does }
{ not. Assumes a full pathName is give in the parameter }
{ PathName. }
{}
{ Written by: Anup Murarka Eric Carlson }
{ ALINK: SKEPTIC ALINK: cyNic }
{ CIS: 76004,3356 }
{}
{ We are part of the Support Tools Development Group, }
{ Apple Computer, Inc. }
{}
{ please DO NOT contack Mac DTS for support of this code! }
{}
{ please DO contact the authors for support of this code! }
{}
{ Send comments, bug reports, requests to any of the above }
{ E-mail addresses or to:}
{}
{ (one of us) }
{ Apple Computer, Inc. }
{ 900 E. Hamilton, Ave. }
{ Campbell, CA 95008 }
{ M/S 72-L }
{}
{ Copyright: © 1989, 1990 by Apple Computer, Inc., all rights reserved. }